package com.mes.service.hy;

import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.mes.dao.cb.MaterielMapper;
import com.mes.dao.hy.BomMapperH;
import com.mes.dao.hy.MaterMapper;
import com.mes.dao.jy.DaysheduDetailMapper;
import com.mes.dao.lc.MaterialStockMapper;
import com.mes.dao.zc.MaterNumMapper;
import com.mes.entity.cb.Materiel;
import com.mes.entity.hy.Maters;
import com.mes.entity.jy.DaysheduDetail;
import com.mes.entity.lc.MaterialStock;
import com.mes.entity.lz.BOM;
import com.mes.entity.zc.MaterNum;

/**
 * 
 * @ClassName:MaterServiceImpl
 * @Description: 领料service实现层
 * @Author hy
 * @Date 2018-5-30上午10:54:54
 * @version 1.0
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class MaterServiceImpl implements IMaterService {

	@Resource
	private MaterMapper materMapper;

	@Resource
	private BomMapperH bomMapperH;
	
	@Resource
	private MaterNumMapper materNumMapper;
	
	@Resource
	private DaysheduDetailMapper daysheduDetailMapper;
	
	@Resource
	private MaterielMapper materieStorageMapper;
	
	@Resource
	private MaterialStockMapper materialStockMapper;

	@Override
	public List<Maters> select(Maters maters) {
		return materMapper.select(maters);
	}

	@Override
	public int selectCount(Maters maters) {
		return materMapper.selectCount(maters);
	}

	@Override
	public int insert(Maters maters) {
		return materMapper.insert(maters);
	}

	@Override
	public String selectOdd() {
		return materMapper.selectOdd();
	}

	@Override
	public int delete(String pickOdd) {
		return materMapper.delete(pickOdd);
	}

	@Override
	public List<Maters> selectByTime(Maters maters) {
		return materMapper.selectByTime(maters);
	}

	@Override
	public int selectCountMT() {
		return materMapper.selectCountMT();
	}

	@Override
	public List<Maters> selectAll() {
		return materMapper.selectAll();
	}

	@Override
	public List<DaysheduDetail> selectDay(DaysheduDetail daysheduDetail) {
		return daysheduDetailMapper.selectDay(daysheduDetail);
	}

	@Override
	public int selectDayCount(DaysheduDetail daysheduDetail) {
		return daysheduDetailMapper.selectDayCount(daysheduDetail);
	}

	@Override
	public List<BOM> selectDetail(BOM bom) {
		return bomMapperH.selectDetail(bom);
	}

	@Override
	public int selectDetailCount(BOM bom) {
		return bomMapperH.selectDetailCount(bom);
	}

	@Override
	public Maters selestByPickOdd(String pickOdd) {
		return materMapper.selestByPickOdd(pickOdd);
	}

	@Override
	public Long selMid(String name) {
		return materieStorageMapper.selMid(name);
	}

	@Override
	public MaterialStock sel(Long id) {
		return materialStockMapper.sel(id);
	}

	@Override
	public List<MaterNum> selMa(String productid) {
		return materNumMapper.selMa(productid);
	}

	@Override
	public void setRe9(DaysheduDetail daysheduDetail) {
		daysheduDetailMapper.setRe9(daysheduDetail);
	}

	@Override
	public List<BOM> queryBOMInfo(String lingliaoOrder) {
		return bomMapperH.queryBOMInfo(lingliaoOrder);
	}

	@Override
	public String queryJYnowma(String mID) {
		return bomMapperH.queryJYnowma(mID);
	}

	@Override
	public Materiel queryMaterial(String mNum2) {
		return bomMapperH.queryMaterial(mNum2);
	}

	@Override
	public void insertBOM(BOM bom) {
		bomMapperH.insertBOM(bom);		
	}

	@Override
	public void delBom(String lingliaoOrder) {
		bomMapperH.delBom(lingliaoOrder);
	}

	@Override
	public void update(DaysheduDetail daysheduDetail) {
		daysheduDetailMapper.update(daysheduDetail);
	}
	@Override
	public int updMa(Maters maters) {
		return materMapper.updMa(maters);
	}
	@Override
	public BOM selByID(String remark05,String remark02) {
		return bomMapperH.selByID(remark05,remark02);
	}

	@Override
	public void updateBom(BOM bom) {
		bomMapperH.updateBom(bom);		
	}

	@Override
	public List<Maters> selMaters() {
		return materMapper.selMaters();
	}
}
